<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: Quaternion.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">2.4.0</span>
   </div>
   <div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_quaternion_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Quaternion.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_quaternion_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_error_8hpp.html">NumCpp/Core/Internal/Error.hpp</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_stl_algorithms_8hpp.html">NumCpp/Core/Internal/StlAlgorithms.hpp</a>&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_types_8hpp.html">NumCpp/Core/Types.hpp</a>&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="argmax_8hpp.html">NumCpp/Functions/argmax.hpp</a>&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="clip_8hpp.html">NumCpp/Functions/clip.hpp</a>&quot;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="dot_8hpp.html">NumCpp/Functions/dot.hpp</a>&quot;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="norm_8hpp.html">NumCpp/Functions/norm.hpp</a>&quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="square_8hpp.html">NumCpp/Functions/square.hpp</a>&quot;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="hat_8hpp.html">NumCpp/Linalg/hat.hpp</a>&quot;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_nd_array_8hpp.html">NumCpp/NdArray.hpp</a>&quot;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="essentially_equal_8hpp.html">NumCpp/Utils/essentiallyEqual.hpp</a>&quot;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="num2str_8hpp.html">NumCpp/Utils/num2str.hpp</a>&quot;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sqr_8hpp.html">NumCpp/Utils/sqr.hpp</a>&quot;</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_vec3_8hpp.html">NumCpp/Vector/Vec3.hpp</a>&quot;</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacenc.html">nc</a></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;{</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keyword">namespace </span>rotations</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="comment">//================================================================================</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="comment">// Class Description:</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html">   57</a></span>&#160;<span class="comment"></span>        <span class="keyword">class </span><a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a8c498c295071b8b787902044bf87d34d">   74</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a8c498c295071b8b787902044bf87d34d">Quaternion</a>(<span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a26f2a9303f0521ee36d92467ab45e3ab">roll</a>, <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a601b444c8c8f820700844d7ab5f743ba">pitch</a>, <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5b5cef534a39badf5d3079ee642e675c">yaw</a>) noexcept </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            {</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                eulerToQuat(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a26f2a9303f0521ee36d92467ab45e3ab">roll</a>, <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a601b444c8c8f820700844d7ab5f743ba">pitch</a>, <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5b5cef534a39badf5d3079ee642e675c">yaw</a>);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a3ba2fb2c68554ec78a0957dc1fd7752d">   88</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3ba2fb2c68554ec78a0957dc1fd7752d">Quaternion</a>(<span class="keywordtype">double</span> inI, <span class="keywordtype">double</span> inJ, <span class="keywordtype">double</span> inK, <span class="keywordtype">double</span> inS) noexcept :</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                components_{ inI, inJ, inK, inS }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            {</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                normalize();</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#addcc7fb7b4acd4201e7f5b90ef207f4d">  102</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#addcc7fb7b4acd4201e7f5b90ef207f4d">Quaternion</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a>&amp; inArray) :</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                components_{ 0.0, 0.0, 0.0, 0.0 }</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                <span class="keywordflow">if</span> (inArray.size() == 3)</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                {</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                    <span class="comment">// euler angles</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                    eulerToQuat(inArray[0], inArray[1], inArray[2]);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (inArray.size() == 4)</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                    <span class="comment">// quaternion i, j, k, s components</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                    <a class="code" href="namespacenc_1_1stl__algorithms.html#ae62a4e197ec640aacea520220bd27cef">stl_algorithms::copy</a>(inArray.cbegin(), inArray.cend(), components_.begin());</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                    normalize();</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                }</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (inArray.size() == 9)</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                {</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                    <span class="comment">// direction cosine matrix</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                    dcmToQuat(inArray);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                }</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                    <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input array is not a valid size.&quot;</span>);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                }</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#abbacae2cb36d4f7e93e1cf130f8ca6b4">  134</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#abbacae2cb36d4f7e93e1cf130f8ca6b4">Quaternion</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec3.html">Vec3</a>&amp; inAxis, <span class="keywordtype">double</span> inAngle) noexcept</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                <span class="comment">// normalize the input vector</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                <a class="code" href="classnc_1_1_vec3.html">Vec3</a> normAxis = inAxis.<a class="code" href="classnc_1_1_vec3.html#a6356b462b11a156b923a7c79b9747c25">normalize</a>();</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> halfAngle = inAngle / 2.0;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> sinHalfAngle = <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfAngle);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;                components_[0] = normAxis.<a class="code" href="classnc_1_1_vec3.html#a7f71dd08d58a1327739de6041e3362bb">x</a> * sinHalfAngle;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;                components_[1] = normAxis.<a class="code" href="classnc_1_1_vec3.html#a969dd1c195f4c78fc3a93292391e29c1">y</a> * sinHalfAngle;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                components_[2] = normAxis.<a class="code" href="classnc_1_1_vec3.html#a0896ee691f46ce0bd669b869fe6acb41">z</a> * sinHalfAngle;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                components_[3] = <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfAngle);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;            }</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a81b7db9d5e593a61272e09ce7dcc1325">  155</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a81b7db9d5e593a61272e09ce7dcc1325">Quaternion</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a>&amp; inAxis, <span class="keywordtype">double</span> inAngle) :</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;                <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>(<a class="code" href="classnc_1_1_vec3.html">Vec3</a>(inAxis), inAngle)</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            {}</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a7cbe975bfed4cd7e5b4606047a9ee7f9">  170</a></span>&#160;<span class="comment"></span>            <span class="keyword">static</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a7cbe975bfed4cd7e5b4606047a9ee7f9">angularVelocity</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat1, <span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat2, <span class="keywordtype">double</span> inTime) </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            {</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> q0 = inQuat1.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">toNdArray</a>();</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> q1 = inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">toNdArray</a>();</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> qDot = q1 - q0;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                qDot /= inTime;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> eyeTimesScalar(3);</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                eyeTimesScalar.<a class="code" href="classnc_1_1_nd_array.html#acac210ad3d3bd973be4bece6e6b625ed">zeros</a>();</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                eyeTimesScalar(0, 0) = inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                eyeTimesScalar(1, 1) = inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                eyeTimesScalar(2, 2) = inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160; </div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> epsilonHat = linalg::hat&lt;double&gt;(inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>(), inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>(), inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>());</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> q(4, 3);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                q.<a class="code" href="classnc_1_1_nd_array.html#a02a06425d6284dbc370807ed11b1f7b2">put</a>(<a class="code" href="classnc_1_1_slice.html">Slice</a>(0, 3), <a class="code" href="classnc_1_1_slice.html">Slice</a>(0, 3), eyeTimesScalar + epsilonHat);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                q(3, 0) = -inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>();</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                q(3, 1) = -inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>();</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                q(3, 2) = -inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>();</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> omega = q.<a class="code" href="classnc_1_1_nd_array.html#a78c99f8306415d8e0ac0e03bb69c6d29">transpose</a>().<a class="code" href="classnc_1_1_nd_array.html#acca065e13f826c504493a2eae31f5d0e">dot</a>(qDot.<a class="code" href="classnc_1_1_nd_array.html#a78c99f8306415d8e0ac0e03bb69c6d29">transpose</a>());</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                <span class="keywordflow">return</span> omega *= 2.0;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160; </div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a13ac87f70271d1771301011887d9d51a">  205</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a13ac87f70271d1771301011887d9d51a">angularVelocity</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat2, <span class="keywordtype">double</span> inTime)<span class="keyword"> const </span></div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a7cbe975bfed4cd7e5b4606047a9ee7f9">angularVelocity</a>(*<span class="keyword">this</span>, inQuat2, inTime);</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            }</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160; </div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#ade406544e8360506bb77102d17b14e61">  217</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ade406544e8360506bb77102d17b14e61">conjugate</a>() const noexcept</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            {</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                <span class="keywordflow">return</span> {-<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>(), -<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>(), -<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>(), <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>()};</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            }</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160; </div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">  229</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>() const noexcept </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            {</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                <span class="keywordflow">return</span> components_[0];</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            }</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160; </div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#ae093d333b66b63eeef5704be4a374af2">  241</a></span>&#160;<span class="comment"></span>            <span class="keyword">static</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ae093d333b66b63eeef5704be4a374af2">identity</a>() noexcept</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            {</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                <span class="keywordflow">return</span> {};</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            }</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160; </div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a9b0634474b2ff27f9443ba256ea00ab1">  253</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a9b0634474b2ff27f9443ba256ea00ab1">inverse</a>() const noexcept</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ade406544e8360506bb77102d17b14e61">conjugate</a>();</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            }</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">  266</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>() const noexcept </div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;            {</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                <span class="keywordflow">return</span> components_[1];</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;            }</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">  278</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>() const noexcept </div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;            {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                <span class="keywordflow">return</span> components_[2];</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            }</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160; </div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a314478702a3da52f2be3f422057d8732">  293</a></span>&#160;<span class="comment"></span>            <span class="keyword">static</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a314478702a3da52f2be3f422057d8732">nlerp</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat1, <span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat2, <span class="keywordtype">double</span> inPercent)</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;            {</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;                <span class="keywordflow">if</span> (inPercent &lt; 0.0 || inPercent &gt; 1.0)</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;                {</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;                    <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input percent must be of the range [0,1].&quot;</span>);</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;                }</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160; </div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="namespacenc_1_1utils.html#a963b90e7c9a3b057a924298750ddf74c">utils::essentiallyEqual</a>(inPercent, 0.0))</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;                {</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;                    <span class="keywordflow">return</span> inQuat1;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;                }</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="namespacenc_1_1utils.html#a963b90e7c9a3b057a924298750ddf74c">utils::essentiallyEqual</a>(inPercent, 1.0))</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;                {</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;                    <span class="keywordflow">return</span> inQuat2;</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;                }</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> oneMinus = 1.0 - inPercent;</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;                std::array&lt;double, 4&gt; newComponents{};</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160; </div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;                <a class="code" href="namespacenc_1_1stl__algorithms.html#a616d5dabd547326285946d0014361ab4">stl_algorithms::transform</a>(inQuat1.components_.begin(), inQuat1.components_.end(),</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;                    inQuat2.components_.begin(), newComponents.begin(),</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;                    [inPercent, oneMinus](<span class="keywordtype">double</span> component1, <span class="keywordtype">double</span> component2)  -&gt; <span class="keywordtype">double</span></div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;                    {</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;                        return oneMinus * component1 + inPercent * component2;</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;                    });</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160; </div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;                <span class="keywordflow">return</span> {newComponents[0], newComponents[1], newComponents[2], newComponents[3]};</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            }</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#ab055510c1338490b957de867cecaf790">  331</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ab055510c1338490b957de867cecaf790">nlerp</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat2, <span class="keywordtype">double</span> inPercent)<span class="keyword"> const</span></div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a314478702a3da52f2be3f422057d8732">nlerp</a>(*<span class="keyword">this</span>, inQuat2, inPercent);</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;            }</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160; </div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00342"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a601b444c8c8f820700844d7ab5f743ba">  342</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a601b444c8c8f820700844d7ab5f743ba">pitch</a>() const noexcept </div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;            {</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;                <span class="keywordflow">return</span> std::asin(2 * (<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>() - <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>()));</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;            }</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00351"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a815d72f9b492ff821077d5d4652b7985">  351</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a815d72f9b492ff821077d5d4652b7985">print</a>()<span class="keyword"> const </span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;                std::cout &lt;&lt; *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;            }</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160; </div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a26f2a9303f0521ee36d92467ab45e3ab">  362</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a26f2a9303f0521ee36d92467ab45e3ab">roll</a>() const noexcept</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;            {</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;                <span class="keywordflow">return</span> std::atan2(2 * (<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>() + <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>()),</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;                    1 - 2 * (<a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>()) + <a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>())));</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;            }</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160; </div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00377"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a2e19c4d0b48d7f73e0aa273d85435370">  377</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a2e19c4d0b48d7f73e0aa273d85435370">rotate</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a>&amp; inVector)<span class="keyword"> const</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;                <span class="keywordflow">if</span> (inVector.<a class="code" href="classnc_1_1_nd_array.html#a055875abbe80163ca91328c0fa8ffbfa">size</a>() != 3)</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;                {</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;                    <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input inVector must be a cartesion vector of length = 3.&quot;</span>);</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;                }</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160; </div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span> * inVector;</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;            }</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160; </div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00396"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a382d4e4c045bce131c5cce634ed077c7">  396</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1_vec3.html">Vec3</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a382d4e4c045bce131c5cce634ed077c7">rotate</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec3.html">Vec3</a>&amp; inVec3)<span class="keyword"> const </span></div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span> * inVec3;</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;            }</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160; </div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00408"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">  408</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>() const noexcept</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;            {</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;                <span class="keywordflow">return</span> components_[3];</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;            }</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160; </div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00423"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a7a39f199e4d1ad773b93c69e66ae0415">  423</a></span>&#160;<span class="comment"></span>            <span class="keyword">static</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a7a39f199e4d1ad773b93c69e66ae0415">slerp</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat1, <span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat2, <span class="keywordtype">double</span> inPercent)</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;            {</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;                <span class="keywordflow">if</span> (inPercent &lt; 0 || inPercent &gt; 1)</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;                {</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;                    <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input percent must be of the range [0, 1]&quot;</span>);</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;                }</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160; </div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;                <span class="keywordflow">if</span> (inPercent == 0)</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;                {</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;                    <span class="keywordflow">return</span> inQuat1;</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;                }</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;                <span class="keywordflow">if</span> (inPercent == 1)</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;                {</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;                    <span class="keywordflow">return</span> inQuat2;</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;                }</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160; </div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;                <span class="keywordtype">double</span> dotProduct = dot&lt;double&gt;(inQuat1.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">toNdArray</a>(), inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">toNdArray</a>()).item();</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160; </div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;                <span class="comment">// If the dot product is negative, the quaternions</span></div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;                <span class="comment">// have opposite handed-ness and slerp won&#39;t take</span></div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;                <span class="comment">// the shorter path. Fix by reversing one quaternion.</span></div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;                <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> quat1Copy(inQuat1);</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;                <span class="keywordflow">if</span> (dotProduct &lt; 0.0)</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;                {</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;                    quat1Copy *= -1;</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;                    dotProduct *= -1;</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;                }</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160; </div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;                constexpr <span class="keywordtype">double</span> DOT_THRESHOLD = 0.9995;</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;                <span class="keywordflow">if</span> (dotProduct &gt; DOT_THRESHOLD) {</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;                    <span class="comment">// If the inputs are too close for comfort, linearly interpolate</span></div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;                    <span class="comment">// and normalize the result.</span></div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;                    <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a314478702a3da52f2be3f422057d8732">nlerp</a>(inQuat1, inQuat2, inPercent);</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;                }</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160; </div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;                dotProduct = <a class="code" href="namespacenc.html#a5200696e06dadf4eca2f0d7332ed4af1">clip</a>(dotProduct, -1.0, 1.0);   <span class="comment">// Robustness: Stay within domain of acos()</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> theta0 = std::acos(dotProduct);        <span class="comment">// angle between input vectors</span></div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> theta = theta0 * inPercent;            <span class="comment">// angle between v0 and result</span></div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160; </div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> s0 = <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(theta) - dotProduct * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(theta) / <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(theta0);  <span class="comment">// == sin(theta_0 - theta) / sin(theta_0)</span></div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> s1 = <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(theta) / <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(theta0);</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160; </div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> interpQuat = (quat1Copy.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">toNdArray</a>() * s0) + (inQuat2.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">toNdArray</a>() * s1);</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(interpQuat);</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;            }</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160; </div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00478"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a687155cd6469c095941b94a738119da9">  478</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a687155cd6469c095941b94a738119da9">slerp</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat2, <span class="keywordtype">double</span> inPercent)<span class="keyword"> const</span></div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a7a39f199e4d1ad773b93c69e66ae0415">slerp</a>(*<span class="keyword">this</span>, inQuat2, inPercent);</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;            }</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160; </div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00490"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a0ddeeba7435df3364f262215f24c93c1">  490</a></span>&#160;<span class="comment"></span>            std::string <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a0ddeeba7435df3364f262215f24c93c1">str</a>()<span class="keyword"> const </span></div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;                std::string output = <span class="stringliteral">&quot;[&quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a16a6ad93c420ed7a003d9921bee1a7c6">utils::num2str</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>()) + <span class="stringliteral">&quot;, &quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a16a6ad93c420ed7a003d9921bee1a7c6">utils::num2str</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>()) +</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;                    <span class="stringliteral">&quot;, &quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a16a6ad93c420ed7a003d9921bee1a7c6">utils::num2str</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>()) + <span class="stringliteral">&quot;, &quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a16a6ad93c420ed7a003d9921bee1a7c6">utils::num2str</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>()) + <span class="stringliteral">&quot;]\n&quot;</span>;</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160; </div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;                <span class="keywordflow">return</span> output;</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;            }</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160; </div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00505"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#aaa79cb63eab5e2bee5101de41d9074f8">  505</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aaa79cb63eab5e2bee5101de41d9074f8">toDCM</a>()<span class="keyword"> const </span></div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> dcm(3);</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160; </div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q0 = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>();</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q1 = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>();</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q2 = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>();</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q3 = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160; </div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q0sqr = <a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(q0);</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q1sqr = <a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(q1);</div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q2sqr = <a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(q2);</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> q3sqr = <a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(q3);</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160; </div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;                dcm(0, 0) = q3sqr + q0sqr - q1sqr - q2sqr;</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;                dcm(0, 1) = 2 * (q0 * q1 - q3 * q2);</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;                dcm(0, 2) = 2 * (q0 * q2 + q3 * q1);</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;                dcm(1, 0) = 2 * (q0 * q1 + q3 * q2);</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;                dcm(1, 1) = q3sqr + q1sqr - q0sqr - q2sqr;</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;                dcm(1, 2) = 2 * (q1 * q2 - q3 * q0);</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;                dcm(2, 0) = 2 * (q0 * q2 - q3 * q1);</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;                dcm(2, 1) = 2 * (q1 * q2 + q3 * q0);</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;                dcm(2, 2) = q3sqr + q2sqr - q0sqr - q1sqr;</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160; </div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;                <span class="keywordflow">return</span> dcm;</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;            }</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160; </div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00539"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">  539</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">toNdArray</a>()<span class="keyword"> const </span></div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;                <span class="keyword">auto</span> componentsCopy = components_;</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a>(componentsCopy);</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;            }</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160; </div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00554"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a30fe8031959271e5b0134a0c562713b4">  554</a></span>&#160;<span class="comment"></span>            <span class="keyword">static</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a30fe8031959271e5b0134a0c562713b4">xRotation</a>(<span class="keywordtype">double</span> inAngle) noexcept</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;            {</div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;                <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec3.html">Vec3</a> eulerAxis = { 1.0, 0.0, 0.0 };</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(eulerAxis, inAngle);</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;            }</div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160; </div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00566"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a5b5cef534a39badf5d3079ee642e675c">  566</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5b5cef534a39badf5d3079ee642e675c">yaw</a>() const noexcept</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;            {</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;                <span class="keywordflow">return</span> std::atan2(2 * (<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>() + <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>()),</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;                    1 - 2 * (<a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>()) + <a class="code" href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">utils::sqr</a>(<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>())));</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;            }</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160; </div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00581"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#ab77da90ef63465f79bd79348330ca9a4">  581</a></span>&#160;<span class="comment"></span>            <span class="keyword">static</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ab77da90ef63465f79bd79348330ca9a4">yRotation</a>(<span class="keywordtype">double</span> inAngle) noexcept</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;            {</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;                <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec3.html">Vec3</a> eulerAxis = { 0.0, 1.0, 0.0 };</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(eulerAxis, inAngle);</div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;            }</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160; </div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00596"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#aaf688fafc4714f1da399e265c8e49a8d">  596</a></span>&#160;<span class="comment"></span>            <span class="keyword">static</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aaf688fafc4714f1da399e265c8e49a8d">zRotation</a>(<span class="keywordtype">double</span> inAngle) noexcept</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;            {</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;                <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec3.html">Vec3</a> eulerAxis = { 0.0, 0.0, 1.0 };</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(eulerAxis, inAngle);</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;            }</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160; </div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00611"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a82f40acb2292256faffab2b88aa38208">  611</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">bool</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a82f40acb2292256faffab2b88aa38208">operator==</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) <span class="keyword">const</span> noexcept</div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;            {</div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;                <span class="keyword">const</span> <span class="keyword">auto</span> comparitor = [](<span class="keywordtype">double</span> value1, <span class="keywordtype">double</span> value2) noexcept -&gt; <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;                {</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;                    <span class="keywordflow">return</span> <a class="code" href="namespacenc_1_1utils.html#a963b90e7c9a3b057a924298750ddf74c">utils::essentiallyEqual</a>(value1, value2);</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;                };</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160; </div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="namespacenc_1_1stl__algorithms.html#ab200b92040bf3da8ee4325f5a994e73d">stl_algorithms::equal</a>(components_.begin(), components_.end(),</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;                    inRhs.components_.begin(), comparitor);</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;            }</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160; </div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00631"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#adcf57fd29d62e19f5c764750262ff7c3">  631</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">bool</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#adcf57fd29d62e19f5c764750262ff7c3">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) <span class="keyword">const</span> noexcept</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;            {</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;                <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == inRhs);</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;            }</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160; </div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00645"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#af2b75597d538e55cfdd1215c35c9c6fe">  645</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#af2b75597d538e55cfdd1215c35c9c6fe">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) noexcept</div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;            {</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;                <a class="code" href="namespacenc_1_1stl__algorithms.html#a616d5dabd547326285946d0014361ab4">stl_algorithms::transform</a>(components_.begin(), components_.end(),</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;                    inRhs.components_.begin(), components_.begin(), std::plus&lt;double&gt;());</div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160; </div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;                normalize();</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160; </div>
<div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;            }</div>
<div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160; </div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00664"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a53c84fdd06a1f980c7c74a185d568156">  664</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a53c84fdd06a1f980c7c74a185d568156">operator+</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) <span class="keyword">const</span> noexcept </div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;            {</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(*<span class="keyword">this</span>) += inRhs;</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;            }</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160; </div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00678"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a60f1f33144c887cde1338fd80183638f">  678</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a60f1f33144c887cde1338fd80183638f">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) noexcept</div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;            {</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;                <a class="code" href="namespacenc_1_1stl__algorithms.html#a616d5dabd547326285946d0014361ab4">stl_algorithms::transform</a>(components_.begin(), components_.end(),</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;                    inRhs.components_.begin(), components_.begin(), std::minus&lt;double&gt;());</div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160; </div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;                normalize();</div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160; </div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;            }</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160; </div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00697"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#ad6eb2370d77e01a944c4b32a48966e76">  697</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ad6eb2370d77e01a944c4b32a48966e76">operator-</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) <span class="keyword">const</span> noexcept </div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;            {</div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(*<span class="keyword">this</span>) -= inRhs;</div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;            }</div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160; </div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00709"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a43fe6603ffbaaadf9348910e17e99519">  709</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a43fe6603ffbaaadf9348910e17e99519">operator-</a>() const noexcept</div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;            {</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(*<span class="keyword">this</span>) *= -1.0;</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;            }</div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160; </div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00723"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#aaaa8a1bd7130e7ce6a819284584a84c5">  723</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aaaa8a1bd7130e7ce6a819284584a84c5">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) noexcept</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;            {</div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;                <span class="keywordtype">double</span> q0 = inRhs.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>();</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;                q0 += inRhs.i() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;                q0 -= inRhs.j() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>();</div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;                q0 += inRhs.k() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>();</div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160; </div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;                <span class="keywordtype">double</span> q1 = inRhs.s() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>();</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;                q1 += inRhs.i() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>();</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;                q1 += inRhs.j() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;                q1 -= inRhs.k() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>();</div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160; </div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;                <span class="keywordtype">double</span> q2 = inRhs.s() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>();</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;                q2 -= inRhs.i() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>();</div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;                q2 += inRhs.j() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>();</div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;                q2 += inRhs.k() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160; </div>
<div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;                <span class="keywordtype">double</span> q3 = inRhs.s() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">s</a>();</div>
<div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;                q3 -= inRhs.i() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">i</a>();</div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;                q3 -= inRhs.j() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">j</a>();</div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;                q3 -= inRhs.k() * <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">k</a>();</div>
<div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160; </div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;                components_[0] = q0;</div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;                components_[1] = q1;</div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;                components_[2] = q2;</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;                components_[3] = q3;</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160; </div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;                normalize();</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160; </div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;            }</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160; </div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00765"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a17636913a3a1e810a81a558dc986fd54">  765</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a17636913a3a1e810a81a558dc986fd54">operator*=</a>(<span class="keywordtype">double</span> inScalar) noexcept</div>
<div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;            {</div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;                <a class="code" href="namespacenc_1_1stl__algorithms.html#a734698435eabdbc5bdf93b195d7fb6a7">stl_algorithms::for_each</a>(components_.begin(), components_.end(),</div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;                    [&amp;inScalar](<span class="keywordtype">double</span>&amp; component)</div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;                    {</div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;                        component *= inScalar;</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;                    });</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160; </div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;                normalize();</div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160; </div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;            }</div>
<div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160; </div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00787"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#adad6ca92266f6090930addc585900805">  787</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#adad6ca92266f6090930addc585900805">operator*</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) <span class="keyword">const</span> noexcept</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;            {</div>
<div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(*<span class="keyword">this</span>) *= inRhs;</div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;            }</div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160; </div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00802"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#ad63920fa01f5bd4949c0fbb3ff7c7137">  802</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ad63920fa01f5bd4949c0fbb3ff7c7137">operator*</a>(<span class="keywordtype">double</span> inScalar) <span class="keyword">const</span> noexcept  </div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;            {</div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(*<span class="keyword">this</span>) *= inScalar;</div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;            }</div>
<div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160; </div>
<div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00816"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a10fd2d44927d59f19e37c45586072d14">  816</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a10fd2d44927d59f19e37c45586072d14">operator*</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a>&amp; inVec)<span class="keyword"> const</span></div>
<div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;                <span class="keywordflow">if</span> (inVec.<a class="code" href="classnc_1_1_nd_array.html#a055875abbe80163ca91328c0fa8ffbfa">size</a>() != 3)</div>
<div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;                {</div>
<div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;                    <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input vector must be a cartesion vector of length = 3.&quot;</span>);</div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;                }</div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160; </div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;                <span class="keyword">const</span> <span class="keyword">auto</span> p = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(inVec[0], inVec[1], inVec[2], 0.0);</div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;                <span class="keyword">const</span> <span class="keyword">auto</span> pPrime = *<span class="keyword">this</span> * p * this-&gt;<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a9b0634474b2ff27f9443ba256ea00ab1">inverse</a>();</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160; </div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;                <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> rotatedVec = { pPrime.i(), pPrime.j(), pPrime.k() };</div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;                rotatedVec *= <a class="code" href="namespacenc.html#aa57b910a1d9a448a15e76bd72563ac5d">norm</a>(inVec).<a class="code" href="classnc_1_1_nd_array.html#abec76b8f271e07fa07cc2f88fed676fa">item</a>();</div>
<div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;                <span class="keywordflow">return</span> rotatedVec;</div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;            }</div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160; </div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00840"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a97a81255a6bb91049b1ad7e7b83e2f7f">  840</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1_vec3.html">Vec3</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a97a81255a6bb91049b1ad7e7b83e2f7f">operator*</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec3.html">Vec3</a>&amp; inVec3)<span class="keyword"> const </span></div>
<div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;<span class="keyword">            </span>{</div>
<div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span> * inVec3.<a class="code" href="classnc_1_1_vec3.html#a45dbcf0b972b41fc3bc78aac17288804">toNdArray</a>();</div>
<div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160;            }</div>
<div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160; </div>
<div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00854"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a859df40774ccff755560604b930c934d">  854</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a859df40774ccff755560604b930c934d">operator/=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) noexcept</div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;            {</div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span> *= inRhs.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ade406544e8360506bb77102d17b14e61">conjugate</a>();</div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;            }</div>
<div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160; </div>
<div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00868"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#ab054e067fc333a48582e291f95120866">  868</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#ab054e067fc333a48582e291f95120866">operator/</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inRhs) <span class="keyword">const</span> noexcept</div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;            {</div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">Quaternion</a>(*<span class="keyword">this</span>) /= inRhs;</div>
<div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;            }</div>
<div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160; </div>
<div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00882"></a><span class="lineno"><a class="line" href="classnc_1_1rotations_1_1_quaternion.html#a6d11f3a719f010cdd220642d2bb586e6">  882</a></span>&#160;<span class="comment"></span>            <span class="keyword">friend</span> std::ostream&amp; <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a6d11f3a719f010cdd220642d2bb586e6">operator&lt;&lt;</a>(std::ostream&amp; inOStream, <span class="keyword">const</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html">Quaternion</a>&amp; inQuat) </div>
<div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;            {</div>
<div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;                inOStream &lt;&lt; inQuat.<a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a0ddeeba7435df3364f262215f24c93c1">str</a>();</div>
<div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;                <span class="keywordflow">return</span> inOStream;</div>
<div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;            }</div>
<div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160; </div>
<div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;            <span class="comment">//====================================Attributes==============================</span></div>
<div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;            std::array&lt;double, 4&gt; components_{ {0.0, 0.0, 0.0, 1.0} };</div>
<div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160; </div>
<div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> normalize() noexcept</div>
<div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;            {</div>
<div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;                <span class="keywordtype">double</span> sumOfSquares = 0.0;</div>
<div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;                <a class="code" href="namespacenc_1_1stl__algorithms.html#a734698435eabdbc5bdf93b195d7fb6a7">stl_algorithms::for_each</a>(components_.begin(), components_.end(),</div>
<div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;                    [&amp;sumOfSquares](<span class="keywordtype">double</span> component) noexcept -&gt; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;                    {</div>
<div class="line"><a name="l00902"></a><span class="lineno">  902</span>&#160;                        sumOfSquares += utils::sqr(component);</div>
<div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;                    });</div>
<div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160; </div>
<div class="line"><a name="l00905"></a><span class="lineno">  905</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="namespacenc.html#aa57b910a1d9a448a15e76bd72563ac5d">norm</a> = <a class="code" href="namespacenc.html#a941a5a1ffb61387495a6f23dc4036287">std::sqrt</a>(sumOfSquares);</div>
<div class="line"><a name="l00906"></a><span class="lineno">  906</span>&#160;                <a class="code" href="namespacenc_1_1stl__algorithms.html#a734698435eabdbc5bdf93b195d7fb6a7">stl_algorithms::for_each</a>(components_.begin(), components_.end(),</div>
<div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;                    [&amp;<a class="code" href="namespacenc.html#aa57b910a1d9a448a15e76bd72563ac5d">norm</a>](<span class="keywordtype">double</span>&amp; component) noexcept -&gt; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00908"></a><span class="lineno">  908</span>&#160;                    {</div>
<div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160;                        component /= norm;</div>
<div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160;                    });</div>
<div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;            }</div>
<div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160; </div>
<div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> eulerToQuat(<span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a26f2a9303f0521ee36d92467ab45e3ab">roll</a>, <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a601b444c8c8f820700844d7ab5f743ba">pitch</a>, <span class="keywordtype">double</span> <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5b5cef534a39badf5d3079ee642e675c">yaw</a>) noexcept </div>
<div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;            {</div>
<div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> halfPhi = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a26f2a9303f0521ee36d92467ab45e3ab">roll</a> / 2.0;</div>
<div class="line"><a name="l00924"></a><span class="lineno">  924</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> halfTheta = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a601b444c8c8f820700844d7ab5f743ba">pitch</a> / 2.0;</div>
<div class="line"><a name="l00925"></a><span class="lineno">  925</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">double</span> halfPsi = <a class="code" href="classnc_1_1rotations_1_1_quaternion.html#a5b5cef534a39badf5d3079ee642e675c">yaw</a> / 2.0;</div>
<div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160; </div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;                components_[0] = <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPhi) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfTheta) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPsi);</div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;                components_[0] -= <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPhi) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfTheta) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPsi);</div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160; </div>
<div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;                components_[1] = <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPhi) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfTheta) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPsi);</div>
<div class="line"><a name="l00931"></a><span class="lineno">  931</span>&#160;                components_[1] += <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPhi) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfTheta) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPsi);</div>
<div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160; </div>
<div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160;                components_[2] = <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPhi) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfTheta) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPsi);</div>
<div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;                components_[2] -= <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPhi) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfTheta) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPsi);</div>
<div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160; </div>
<div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;                components_[3] = <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPhi) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfTheta) * <a class="code" href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">std::cos</a>(halfPsi);</div>
<div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;                components_[3] += <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPhi) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfTheta) * <a class="code" href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">std::sin</a>(halfPsi);</div>
<div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;            }</div>
<div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160; </div>
<div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;            <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;            <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> dcmToQuat(<span class="keyword">const</span> NdArray&lt;double&gt;&amp; dcm)</div>
<div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;            {</div>
<div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;                <span class="keyword">const</span> Shape inShape = dcm.shape();</div>
<div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;                <span class="keywordflow">if</span> (!(inShape.rows == 3 &amp;&amp; inShape.cols == 3))</div>
<div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;                {</div>
<div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;                    <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input direction cosine matrix must have shape = (3,3).&quot;</span>);</div>
<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;                }</div>
<div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160; </div>
<div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160;                NdArray&lt;double&gt; checks(1, 4);</div>
<div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;                checks[0] = 1 + dcm(0, 0) + dcm(1, 1) + dcm(2, 2);</div>
<div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;                checks[1] = 1 + dcm(0, 0) - dcm(1, 1) - dcm(2, 2);</div>
<div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;                checks[2] = 1 - dcm(0, 0) + dcm(1, 1) - dcm(2, 2);</div>
<div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;                checks[3] = 1 - dcm(0, 0) - dcm(1, 1) + dcm(2, 2);</div>
<div class="line"><a name="l00959"></a><span class="lineno">  959</span>&#160; </div>
<div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;                <span class="keyword">const</span> <a class="code" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> maxIdx = <a class="code" href="namespacenc.html#a33dac7f03588175031847327655f0b5d">argmax</a>(checks).item();</div>
<div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160; </div>
<div class="line"><a name="l00962"></a><span class="lineno">  962</span>&#160;                <span class="keywordflow">switch</span> (maxIdx)</div>
<div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;                {</div>
<div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;                    <span class="keywordflow">case</span> 0:</div>
<div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;                    {</div>
<div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160;                        components_[3] = 0.5 * <a class="code" href="namespacenc.html#a941a5a1ffb61387495a6f23dc4036287">std::sqrt</a>(1 + dcm(0, 0) + dcm(1, 1) + dcm(2, 2));</div>
<div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;                        components_[0] = (dcm(2, 1) - dcm(1, 2)) / (4 * components_[3]);</div>
<div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;                        components_[1] = (dcm(0, 2) - dcm(2, 0)) / (4 * components_[3]);</div>
<div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;                        components_[2] = (dcm(1, 0) - dcm(0, 1)) / (4 * components_[3]);</div>
<div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160; </div>
<div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;                    }</div>
<div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;                    <span class="keywordflow">case</span> 1:</div>
<div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;                    {</div>
<div class="line"><a name="l00975"></a><span class="lineno">  975</span>&#160;                        components_[0] = 0.5 * <a class="code" href="namespacenc.html#a941a5a1ffb61387495a6f23dc4036287">std::sqrt</a>(1 + dcm(0, 0) - dcm(1, 1) - dcm(2, 2));</div>
<div class="line"><a name="l00976"></a><span class="lineno">  976</span>&#160;                        components_[1] = (dcm(1, 0) + dcm(0, 1)) / (4 * components_[0]);</div>
<div class="line"><a name="l00977"></a><span class="lineno">  977</span>&#160;                        components_[2] = (dcm(2, 0) + dcm(0, 2)) / (4 * components_[0]);</div>
<div class="line"><a name="l00978"></a><span class="lineno">  978</span>&#160;                        components_[3] = (dcm(2, 1) - dcm(1, 2)) / (4 * components_[0]);</div>
<div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160; </div>
<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160;                    }</div>
<div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;                    <span class="keywordflow">case</span> 2:</div>
<div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160;                    {</div>
<div class="line"><a name="l00984"></a><span class="lineno">  984</span>&#160;                        components_[1] = 0.5 * <a class="code" href="namespacenc.html#a941a5a1ffb61387495a6f23dc4036287">std::sqrt</a>(1 - dcm(0, 0) + dcm(1, 1) - dcm(2, 2));</div>
<div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;                        components_[0] = (dcm(1, 0) + dcm(0, 1)) / (4 * components_[1]);</div>
<div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;                        components_[2] = (dcm(2, 1) + dcm(1, 2)) / (4 * components_[1]);</div>
<div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;                        components_[3] = (dcm(0, 2) - dcm(2, 0)) / (4 * components_[1]);</div>
<div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160; </div>
<div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;                    }</div>
<div class="line"><a name="l00991"></a><span class="lineno">  991</span>&#160;                    <span class="keywordflow">case</span> 3:</div>
<div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;                    {</div>
<div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;                        components_[2] = 0.5 * <a class="code" href="namespacenc.html#a941a5a1ffb61387495a6f23dc4036287">std::sqrt</a>(1 - dcm(0, 0) - dcm(1, 1) + dcm(2, 2));</div>
<div class="line"><a name="l00994"></a><span class="lineno">  994</span>&#160;                        components_[0] = (dcm(2, 0) + dcm(0, 2)) / (4 * components_[2]);</div>
<div class="line"><a name="l00995"></a><span class="lineno">  995</span>&#160;                        components_[1] = (dcm(2, 1) + dcm(1, 2)) / (4 * components_[2]);</div>
<div class="line"><a name="l00996"></a><span class="lineno">  996</span>&#160;                        components_[3] = (dcm(1, 0) - dcm(0, 1)) / (4 * components_[2]);</div>
<div class="line"><a name="l00997"></a><span class="lineno">  997</span>&#160; </div>
<div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;                    }</div>
<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;                }</div>
<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;            }</div>
<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;        };</div>
<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;    }  <span class="comment">// namespace rotations</span></div>
<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;}  <span class="comment">// namespace nc</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_af2b75597d538e55cfdd1215c35c9c6fe"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#af2b75597d538e55cfdd1215c35c9c6fe">nc::rotations::Quaternion::operator+=</a></div><div class="ttdeci">Quaternion &amp; operator+=(const Quaternion &amp;inRhs) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:645</div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html_abec76b8f271e07fa07cc2f88fed676fa"><div class="ttname"><a href="classnc_1_1_nd_array.html#abec76b8f271e07fa07cc2f88fed676fa">nc::NdArray::item</a></div><div class="ttdeci">value_type item() const</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:2975</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_adcf57fd29d62e19f5c764750262ff7c3"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#adcf57fd29d62e19f5c764750262ff7c3">nc::rotations::Quaternion::operator!=</a></div><div class="ttdeci">bool operator!=(const Quaternion &amp;inRhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:631</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a3ba2fb2c68554ec78a0957dc1fd7752d"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a3ba2fb2c68554ec78a0957dc1fd7752d">nc::rotations::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(double inI, double inJ, double inK, double inS) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:88</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a97a81255a6bb91049b1ad7e7b83e2f7f"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a97a81255a6bb91049b1ad7e7b83e2f7f">nc::rotations::Quaternion::operator*</a></div><div class="ttdeci">Vec3 operator*(const Vec3 &amp;inVec3) const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:840</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a7a39f199e4d1ad773b93c69e66ae0415"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a7a39f199e4d1ad773b93c69e66ae0415">nc::rotations::Quaternion::slerp</a></div><div class="ttdeci">static Quaternion slerp(const Quaternion &amp;inQuat1, const Quaternion &amp;inQuat2, double inPercent)</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:423</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html">nc::rotations::Quaternion</a></div><div class="ttdoc">Holds a unit quaternion.</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:57</div></div>
<div class="ttc" id="aclassnc_1_1_vec3_html_a969dd1c195f4c78fc3a93292391e29c1"><div class="ttname"><a href="classnc_1_1_vec3.html#a969dd1c195f4c78fc3a93292391e29c1">nc::Vec3::y</a></div><div class="ttdeci">double y</div><div class="ttdef"><b>Definition:</b> Vec3.hpp:54</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a60f1f33144c887cde1338fd80183638f"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a60f1f33144c887cde1338fd80183638f">nc::rotations::Quaternion::operator-=</a></div><div class="ttdeci">Quaternion &amp; operator-=(const Quaternion &amp;inRhs) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:678</div></div>
<div class="ttc" id="a_error_8hpp_html"><div class="ttname"><a href="_error_8hpp.html">Error.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html_acca065e13f826c504493a2eae31f5d0e"><div class="ttname"><a href="classnc_1_1_nd_array.html#acca065e13f826c504493a2eae31f5d0e">nc::NdArray::dot</a></div><div class="ttdeci">NdArray&lt; dtype &gt; dot(const NdArray&lt; dtype &gt; &amp;inOtherArray) const</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:2661</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_ae093d333b66b63eeef5704be4a374af2"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#ae093d333b66b63eeef5704be4a374af2">nc::rotations::Quaternion::identity</a></div><div class="ttdeci">static Quaternion identity() noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:241</div></div>
<div class="ttc" id="anamespacenc_html_a941a5a1ffb61387495a6f23dc4036287"><div class="ttname"><a href="namespacenc.html#a941a5a1ffb61387495a6f23dc4036287">nc::sqrt</a></div><div class="ttdeci">auto sqrt(dtype inValue) noexcept</div><div class="ttdef"><b>Definition:</b> sqrt.hpp:50</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a601b444c8c8f820700844d7ab5f743ba"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a601b444c8c8f820700844d7ab5f743ba">nc::rotations::Quaternion::pitch</a></div><div class="ttdeci">double pitch() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:342</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_aaaa8a1bd7130e7ce6a819284584a84c5"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#aaaa8a1bd7130e7ce6a819284584a84c5">nc::rotations::Quaternion::operator*=</a></div><div class="ttdeci">Quaternion &amp; operator*=(const Quaternion &amp;inRhs) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:723</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_aaa79cb63eab5e2bee5101de41d9074f8"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#aaa79cb63eab5e2bee5101de41d9074f8">nc::rotations::Quaternion::toDCM</a></div><div class="ttdeci">NdArray&lt; double &gt; toDCM() const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:505</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a075b6f1befef247f5d638c91e1a451fd"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a075b6f1befef247f5d638c91e1a451fd">nc::rotations::Quaternion::s</a></div><div class="ttdeci">double s() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:408</div></div>
<div class="ttc" id="asquare_8hpp_html"><div class="ttname"><a href="square_8hpp.html">square.hpp</a></div></div>
<div class="ttc" id="anamespacenc_html_a5200696e06dadf4eca2f0d7332ed4af1"><div class="ttname"><a href="namespacenc.html#a5200696e06dadf4eca2f0d7332ed4af1">nc::clip</a></div><div class="ttdeci">dtype clip(dtype inValue, dtype inMinValue, dtype inMaxValue)</div><div class="ttdef"><b>Definition:</b> clip.hpp:53</div></div>
<div class="ttc" id="anamespacenc_1_1utils_html_a963b90e7c9a3b057a924298750ddf74c"><div class="ttname"><a href="namespacenc_1_1utils.html#a963b90e7c9a3b057a924298750ddf74c">nc::utils::essentiallyEqual</a></div><div class="ttdeci">bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept</div><div class="ttdef"><b>Definition:</b> essentiallyEqual.hpp:52</div></div>
<div class="ttc" id="aclip_8hpp_html"><div class="ttname"><a href="clip_8hpp.html">clip.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a314478702a3da52f2be3f422057d8732"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a314478702a3da52f2be3f422057d8732">nc::rotations::Quaternion::nlerp</a></div><div class="ttdeci">static Quaternion nlerp(const Quaternion &amp;inQuat1, const Quaternion &amp;inQuat2, double inPercent)</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:293</div></div>
<div class="ttc" id="anamespacenc_1_1utils_html_a16a6ad93c420ed7a003d9921bee1a7c6"><div class="ttname"><a href="namespacenc_1_1utils.html#a16a6ad93c420ed7a003d9921bee1a7c6">nc::utils::num2str</a></div><div class="ttdeci">std::string num2str(dtype inNumber)</div><div class="ttdef"><b>Definition:</b> num2str.hpp:46</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a5b5cef534a39badf5d3079ee642e675c"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a5b5cef534a39badf5d3079ee642e675c">nc::rotations::Quaternion::yaw</a></div><div class="ttdeci">double yaw() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:566</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_ab054e067fc333a48582e291f95120866"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#ab054e067fc333a48582e291f95120866">nc::rotations::Quaternion::operator/</a></div><div class="ttdeci">Quaternion operator/(const Quaternion &amp;inRhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:868</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a9b0634474b2ff27f9443ba256ea00ab1"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a9b0634474b2ff27f9443ba256ea00ab1">nc::rotations::Quaternion::inverse</a></div><div class="ttdeci">Quaternion inverse() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:253</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a30fe8031959271e5b0134a0c562713b4"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a30fe8031959271e5b0134a0c562713b4">nc::rotations::Quaternion::xRotation</a></div><div class="ttdeci">static Quaternion xRotation(double inAngle) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:554</div></div>
<div class="ttc" id="aclassnc_1_1_vec3_html_a0896ee691f46ce0bd669b869fe6acb41"><div class="ttname"><a href="classnc_1_1_vec3.html#a0896ee691f46ce0bd669b869fe6acb41">nc::Vec3::z</a></div><div class="ttdeci">double z</div><div class="ttdef"><b>Definition:</b> Vec3.hpp:55</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a26f2a9303f0521ee36d92467ab45e3ab"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a26f2a9303f0521ee36d92467ab45e3ab">nc::rotations::Quaternion::roll</a></div><div class="ttdeci">double roll() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:362</div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html_a78c99f8306415d8e0ac0e03bb69c6d29"><div class="ttname"><a href="classnc_1_1_nd_array.html#a78c99f8306415d8e0ac0e03bb69c6d29">nc::NdArray::transpose</a></div><div class="ttdeci">NdArray&lt; dtype &gt; transpose() const</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:4652</div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html"><div class="ttname"><a href="classnc_1_1_nd_array.html">nc::NdArray&lt; double &gt;</a></div></div>
<div class="ttc" id="anamespacenc_html_a736de91eb8f79bfaf4dc92d7161f1c87"><div class="ttname"><a href="namespacenc.html#a736de91eb8f79bfaf4dc92d7161f1c87">nc::cos</a></div><div class="ttdeci">auto cos(dtype inValue) noexcept</div><div class="ttdef"><b>Definition:</b> cos.hpp:51</div></div>
<div class="ttc" id="anamespacenc_1_1stl__algorithms_html_a616d5dabd547326285946d0014361ab4"><div class="ttname"><a href="namespacenc_1_1stl__algorithms.html#a616d5dabd547326285946d0014361ab4">nc::stl_algorithms::transform</a></div><div class="ttdeci">OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)</div><div class="ttdef"><b>Definition:</b> StlAlgorithms.hpp:702</div></div>
<div class="ttc" id="anamespacenc_1_1stl__algorithms_html_a734698435eabdbc5bdf93b195d7fb6a7"><div class="ttname"><a href="namespacenc_1_1stl__algorithms.html#a734698435eabdbc5bdf93b195d7fb6a7">nc::stl_algorithms::for_each</a></div><div class="ttdeci">void for_each(InputIt first, InputIt last, UnaryFunction f)</div><div class="ttdef"><b>Definition:</b> StlAlgorithms.hpp:213</div></div>
<div class="ttc" id="anamespacenc_html_af0f49663fb63332596e2e6327009d581"><div class="ttname"><a href="namespacenc.html#af0f49663fb63332596e2e6327009d581">nc::uint32</a></div><div class="ttdeci">std::uint32_t uint32</div><div class="ttdef"><b>Definition:</b> Types.hpp:40</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_aaf688fafc4714f1da399e265c8e49a8d"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#aaf688fafc4714f1da399e265c8e49a8d">nc::rotations::Quaternion::zRotation</a></div><div class="ttdeci">static Quaternion zRotation(double inAngle) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:596</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_ad6eb2370d77e01a944c4b32a48966e76"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#ad6eb2370d77e01a944c4b32a48966e76">nc::rotations::Quaternion::operator-</a></div><div class="ttdeci">Quaternion operator-(const Quaternion &amp;inRhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:697</div></div>
<div class="ttc" id="a_nd_array_8hpp_html"><div class="ttname"><a href="_nd_array_8hpp.html">NdArray.hpp</a></div></div>
<div class="ttc" id="anum2str_8hpp_html"><div class="ttname"><a href="num2str_8hpp.html">num2str.hpp</a></div></div>
<div class="ttc" id="adot_8hpp_html"><div class="ttname"><a href="dot_8hpp.html">dot.hpp</a></div></div>
<div class="ttc" id="a_vec3_8hpp_html"><div class="ttname"><a href="_vec3_8hpp.html">Vec3.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_adad6ca92266f6090930addc585900805"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#adad6ca92266f6090930addc585900805">nc::rotations::Quaternion::operator*</a></div><div class="ttdeci">Quaternion operator*(const Quaternion &amp;inRhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:787</div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html_a02a06425d6284dbc370807ed11b1f7b2"><div class="ttname"><a href="classnc_1_1_nd_array.html#a02a06425d6284dbc370807ed11b1f7b2">nc::NdArray::put</a></div><div class="ttdeci">NdArray&lt; dtype &gt; &amp; put(int32 inIndex, value_type inValue)</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:3729</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_addcc7fb7b4acd4201e7f5b90ef207f4d"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#addcc7fb7b4acd4201e7f5b90ef207f4d">nc::rotations::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(const NdArray&lt; double &gt; &amp;inArray)</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:102</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a4a11c1c0daf982f9367e4541e5735e71"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a4a11c1c0daf982f9367e4541e5735e71">nc::rotations::Quaternion::toNdArray</a></div><div class="ttdeci">NdArray&lt; double &gt; toNdArray() const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:539</div></div>
<div class="ttc" id="anamespacenc_1_1stl__algorithms_html_ae62a4e197ec640aacea520220bd27cef"><div class="ttname"><a href="namespacenc_1_1stl__algorithms.html#ae62a4e197ec640aacea520220bd27cef">nc::stl_algorithms::copy</a></div><div class="ttdeci">OutputIt copy(InputIt first, InputIt last, OutputIt destination) noexcept</div><div class="ttdef"><b>Definition:</b> StlAlgorithms.hpp:95</div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html_a055875abbe80163ca91328c0fa8ffbfa"><div class="ttname"><a href="classnc_1_1_nd_array.html#a055875abbe80163ca91328c0fa8ffbfa">nc::NdArray::size</a></div><div class="ttdeci">size_type size() const noexcept</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:4370</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a13ac87f70271d1771301011887d9d51a"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a13ac87f70271d1771301011887d9d51a">nc::rotations::Quaternion::angularVelocity</a></div><div class="ttdeci">NdArray&lt; double &gt; angularVelocity(const Quaternion &amp;inQuat2, double inTime) const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:205</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a82f40acb2292256faffab2b88aa38208"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a82f40acb2292256faffab2b88aa38208">nc::rotations::Quaternion::operator==</a></div><div class="ttdeci">bool operator==(const Quaternion &amp;inRhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:611</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a815d72f9b492ff821077d5d4652b7985"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a815d72f9b492ff821077d5d4652b7985">nc::rotations::Quaternion::print</a></div><div class="ttdeci">void print() const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:351</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a382d4e4c045bce131c5cce634ed077c7"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a382d4e4c045bce131c5cce634ed077c7">nc::rotations::Quaternion::rotate</a></div><div class="ttdeci">Vec3 rotate(const Vec3 &amp;inVec3) const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:396</div></div>
<div class="ttc" id="anamespacenc_html_a3fa4e582cdeef0716309ad51378f2983"><div class="ttname"><a href="namespacenc.html#a3fa4e582cdeef0716309ad51378f2983">nc::sin</a></div><div class="ttdeci">auto sin(dtype inValue) noexcept</div><div class="ttdef"><b>Definition:</b> sin.hpp:51</div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html_acac210ad3d3bd973be4bece6e6b625ed"><div class="ttname"><a href="classnc_1_1_nd_array.html#acac210ad3d3bd973be4bece6e6b625ed">nc::NdArray::zeros</a></div><div class="ttdeci">NdArray&lt; dtype &gt; &amp; zeros() noexcept</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:4670</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_aa2eee61d3a428a558f28d1bb6cc6a048"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#aa2eee61d3a428a558f28d1bb6cc6a048">nc::rotations::Quaternion::k</a></div><div class="ttdeci">double k() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:278</div></div>
<div class="ttc" id="ahat_8hpp_html"><div class="ttname"><a href="hat_8hpp.html">hat.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_ab77da90ef63465f79bd79348330ca9a4"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#ab77da90ef63465f79bd79348330ca9a4">nc::rotations::Quaternion::yRotation</a></div><div class="ttdeci">static Quaternion yRotation(double inAngle) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:581</div></div>
<div class="ttc" id="anamespacenc_html"><div class="ttname"><a href="namespacenc.html">nc</a></div><div class="ttdef"><b>Definition:</b> Coordinate.hpp:44</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a6d11f3a719f010cdd220642d2bb586e6"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a6d11f3a719f010cdd220642d2bb586e6">nc::rotations::Quaternion::operator&lt;&lt;</a></div><div class="ttdeci">friend std::ostream &amp; operator&lt;&lt;(std::ostream &amp;inOStream, const Quaternion &amp;inQuat)</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:882</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a3b6901fb3a079eb9249bd1bf3098c36c"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a3b6901fb3a079eb9249bd1bf3098c36c">nc::rotations::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion()=default</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_acb62c703a1f96333bf76ad0735cb8b97"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#acb62c703a1f96333bf76ad0735cb8b97">nc::rotations::Quaternion::j</a></div><div class="ttdeci">double j() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:266</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_abbacae2cb36d4f7e93e1cf130f8ca6b4"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#abbacae2cb36d4f7e93e1cf130f8ca6b4">nc::rotations::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(const Vec3 &amp;inAxis, double inAngle) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:134</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a17636913a3a1e810a81a558dc986fd54"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a17636913a3a1e810a81a558dc986fd54">nc::rotations::Quaternion::operator*=</a></div><div class="ttdeci">Quaternion &amp; operator*=(double inScalar) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:765</div></div>
<div class="ttc" id="asqr_8hpp_html"><div class="ttname"><a href="sqr_8hpp.html">sqr.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_ad63920fa01f5bd4949c0fbb3ff7c7137"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#ad63920fa01f5bd4949c0fbb3ff7c7137">nc::rotations::Quaternion::operator*</a></div><div class="ttdeci">Quaternion operator*(double inScalar) const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:802</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a2e19c4d0b48d7f73e0aa273d85435370"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a2e19c4d0b48d7f73e0aa273d85435370">nc::rotations::Quaternion::rotate</a></div><div class="ttdeci">NdArray&lt; double &gt; rotate(const NdArray&lt; double &gt; &amp;inVector) const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:377</div></div>
<div class="ttc" id="aessentially_equal_8hpp_html"><div class="ttname"><a href="essentially_equal_8hpp.html">essentiallyEqual.hpp</a></div></div>
<div class="ttc" id="aargmax_8hpp_html"><div class="ttname"><a href="argmax_8hpp.html">argmax.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1_vec3_html_a45dbcf0b972b41fc3bc78aac17288804"><div class="ttname"><a href="classnc_1_1_vec3.html#a45dbcf0b972b41fc3bc78aac17288804">nc::Vec3::toNdArray</a></div><div class="ttdeci">NdArray&lt; double &gt; toNdArray() const</div><div class="ttdef"><b>Definition:</b> Vec3.hpp:323</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a0ddeeba7435df3364f262215f24c93c1"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a0ddeeba7435df3364f262215f24c93c1">nc::rotations::Quaternion::str</a></div><div class="ttdeci">std::string str() const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:490</div></div>
<div class="ttc" id="a_error_8hpp_html_af2aff1172060367b9c5398fa097fa8fd"><div class="ttname"><a href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a></div><div class="ttdeci">#define THROW_INVALID_ARGUMENT_ERROR(msg)</div><div class="ttdef"><b>Definition:</b> Error.hpp:36</div></div>
<div class="ttc" id="aclassnc_1_1_vec3_html_a7f71dd08d58a1327739de6041e3362bb"><div class="ttname"><a href="classnc_1_1_vec3.html#a7f71dd08d58a1327739de6041e3362bb">nc::Vec3::x</a></div><div class="ttdeci">double x</div><div class="ttdef"><b>Definition:</b> Vec3.hpp:53</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a5a661b367dff916e8bdb5e28ac608ecd"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a5a661b367dff916e8bdb5e28ac608ecd">nc::rotations::Quaternion::i</a></div><div class="ttdeci">double i() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:229</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a53c84fdd06a1f980c7c74a185d568156"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a53c84fdd06a1f980c7c74a185d568156">nc::rotations::Quaternion::operator+</a></div><div class="ttdeci">Quaternion operator+(const Quaternion &amp;inRhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:664</div></div>
<div class="ttc" id="anamespacenc_1_1utils_html_ae792e10a24b7e5b8291a6c31a28a4512"><div class="ttname"><a href="namespacenc_1_1utils.html#ae792e10a24b7e5b8291a6c31a28a4512">nc::utils::sqr</a></div><div class="ttdeci">constexpr dtype sqr(dtype inValue) noexcept</div><div class="ttdef"><b>Definition:</b> sqr.hpp:44</div></div>
<div class="ttc" id="a_stl_algorithms_8hpp_html"><div class="ttname"><a href="_stl_algorithms_8hpp.html">StlAlgorithms.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a687155cd6469c095941b94a738119da9"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a687155cd6469c095941b94a738119da9">nc::rotations::Quaternion::slerp</a></div><div class="ttdeci">Quaternion slerp(const Quaternion &amp;inQuat2, double inPercent) const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:478</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a8c498c295071b8b787902044bf87d34d"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a8c498c295071b8b787902044bf87d34d">nc::rotations::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(double roll, double pitch, double yaw) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:74</div></div>
<div class="ttc" id="anamespacenc_1_1stl__algorithms_html_ab200b92040bf3da8ee4325f5a994e73d"><div class="ttname"><a href="namespacenc_1_1stl__algorithms.html#ab200b92040bf3da8ee4325f5a994e73d">nc::stl_algorithms::equal</a></div><div class="ttdeci">bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) noexcept</div><div class="ttdef"><b>Definition:</b> StlAlgorithms.hpp:135</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_ade406544e8360506bb77102d17b14e61"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#ade406544e8360506bb77102d17b14e61">nc::rotations::Quaternion::conjugate</a></div><div class="ttdeci">Quaternion conjugate() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:217</div></div>
<div class="ttc" id="a_types_8hpp_html"><div class="ttname"><a href="_types_8hpp.html">Types.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1_slice_html"><div class="ttname"><a href="classnc_1_1_slice.html">nc::Slice</a></div><div class="ttdoc">A Class for slicing into NdArrays.</div><div class="ttdef"><b>Definition:</b> Slice.hpp:43</div></div>
<div class="ttc" id="aclassnc_1_1_vec3_html"><div class="ttname"><a href="classnc_1_1_vec3.html">nc::Vec3</a></div><div class="ttdoc">Holds a 3D vector.</div><div class="ttdef"><b>Definition:</b> Vec3.hpp:49</div></div>
<div class="ttc" id="aclassnc_1_1_vec3_html_a6356b462b11a156b923a7c79b9747c25"><div class="ttname"><a href="classnc_1_1_vec3.html#a6356b462b11a156b923a7c79b9747c25">nc::Vec3::normalize</a></div><div class="ttdeci">Vec3 normalize() const noexcept</div><div class="ttdef"><b>Definition:</b> Vec3.hpp:275</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a859df40774ccff755560604b930c934d"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a859df40774ccff755560604b930c934d">nc::rotations::Quaternion::operator/=</a></div><div class="ttdeci">Quaternion &amp; operator/=(const Quaternion &amp;inRhs) noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:854</div></div>
<div class="ttc" id="anorm_8hpp_html"><div class="ttname"><a href="norm_8hpp.html">norm.hpp</a></div></div>
<div class="ttc" id="anamespacenc_html_aa57b910a1d9a448a15e76bd72563ac5d"><div class="ttname"><a href="namespacenc.html#aa57b910a1d9a448a15e76bd72563ac5d">nc::norm</a></div><div class="ttdeci">NdArray&lt; double &gt; norm(const NdArray&lt; dtype &gt; &amp;inArray, Axis inAxis=Axis::NONE)</div><div class="ttdef"><b>Definition:</b> norm.hpp:52</div></div>
<div class="ttc" id="anamespacenc_html_a33dac7f03588175031847327655f0b5d"><div class="ttname"><a href="namespacenc.html#a33dac7f03588175031847327655f0b5d">nc::argmax</a></div><div class="ttdeci">NdArray&lt; uint32 &gt; argmax(const NdArray&lt; dtype &gt; &amp;inArray, Axis inAxis=Axis::NONE)</div><div class="ttdef"><b>Definition:</b> argmax.hpp:47</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a81b7db9d5e593a61272e09ce7dcc1325"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a81b7db9d5e593a61272e09ce7dcc1325">nc::rotations::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(const NdArray&lt; double &gt; &amp;inAxis, double inAngle)</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:155</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a7cbe975bfed4cd7e5b4606047a9ee7f9"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a7cbe975bfed4cd7e5b4606047a9ee7f9">nc::rotations::Quaternion::angularVelocity</a></div><div class="ttdeci">static NdArray&lt; double &gt; angularVelocity(const Quaternion &amp;inQuat1, const Quaternion &amp;inQuat2, double inTime)</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:170</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a43fe6603ffbaaadf9348910e17e99519"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a43fe6603ffbaaadf9348910e17e99519">nc::rotations::Quaternion::operator-</a></div><div class="ttdeci">Quaternion operator-() const noexcept</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:709</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_a10fd2d44927d59f19e37c45586072d14"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#a10fd2d44927d59f19e37c45586072d14">nc::rotations::Quaternion::operator*</a></div><div class="ttdeci">NdArray&lt; double &gt; operator*(const NdArray&lt; double &gt; &amp;inVec) const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:816</div></div>
<div class="ttc" id="aclassnc_1_1rotations_1_1_quaternion_html_ab055510c1338490b957de867cecaf790"><div class="ttname"><a href="classnc_1_1rotations_1_1_quaternion.html#ab055510c1338490b957de867cecaf790">nc::rotations::Quaternion::nlerp</a></div><div class="ttdeci">Quaternion nlerp(const Quaternion &amp;inQuat2, double inPercent) const</div><div class="ttdef"><b>Definition:</b> Quaternion.hpp:331</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_34171bd951b13a53aa9f237277a18e40.html">NumCpp</a></li><li class="navelem"><a class="el" href="dir_cac3062759fc9841f0966ab05282555a.html">Rotations</a></li><li class="navelem"><a class="el" href="_quaternion_8hpp.html">Quaternion.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
